<?php
namespace cms\controllers;

use Yii;
use cms\controllers\AuthController;
use common\behaviors\Albums;


class AlbumController extends AuthController
{
    public function behaviors()
    {
        return [
             // 注册匿名行为，只有行为类名
            Albums::className(),

        ];
    }

    /*相册列表*/
    public function actionAlbumCategoryList()
    {
        return $this->getAlbumCategoryList($this->userInfo['com_id'], $this->app_id);
    }
    
    
    /*创建相册*/
    public function actionAddAlbumCategoty()
    {
        return $this->addAlbumCategoty($this->post, $this->userInfo['com_id'], $this->app_id);
    }

    /*获取相册的图片*/
    public function actionAlbumList()
    {
        // P($this->userInfo);
        return $this->albumList($this->post, $this->userInfo['com_id']);
    }

    /*图片上传*/
    public function actionUpload()
    {
        return $this->upload($this->post, $this->appid, $this->userInfo['com_id'], $this->app_id);
    }
    

    
}
